'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = {
      code:0,
      mes:'index获取'
    };
  }
  async create(){
    const { ctx } = this;
    ctx.body = {
      code:0,
      mes:'create添加'
    };
  }
  async update(){
    const { ctx } = this;
    ctx.body = {
      code:0,
      mes:'update更新'
    };
  }
  async destroy(){
    const { ctx } = this;
    const {id} = ctx.params;
    ctx.body = {
      code:0,
      id,
      mes:'destroy删除'
    };
  }
}

module.exports = HomeController;
